package arquitetura.view;

import java.awt.BorderLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTextPane;
import java.awt.Font;
import javax.swing.JLabel;
import java.awt.Color;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.border.BevelBorder;
import javax.swing.border.LineBorder;
import java.awt.SystemColor;

public class Sobre extends JDialog {

	/**
	 * 
	 */
	private static final long serialVersionUID = 488407685098756790L;
	private final JPanel contentPanel = new JPanel();

	public static void exibeTela() {
		try {
			Sobre dialog = new Sobre();
			dialog.setLocationRelativeTo(null);
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setModal(true);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public Sobre() {
		setTitle("Sobre");
		setBounds(100, 100, 450, 312);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);
		{
			JButton cancelButton = new JButton("Fechar");
			cancelButton.setBounds(355, 242, 67, 25);
			contentPanel.add(cancelButton);
			cancelButton.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					dispose();
				}
			});
			cancelButton.setActionCommand("Cancel");
		}
		{
			JPanel panel = new JPanel();
			panel.setBackground(new Color(240, 248, 255));
			panel.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
			panel.setBounds(12, 93, 410, 143);
			contentPanel.add(panel);
			panel.setLayout(null);
			{
				JPanel panel_1 = new JPanel();
				panel_1.setBorder(new LineBorder(new Color(176, 224, 230)));
				panel_1.setBackground(new Color(255, 255, 255));
				panel_1.setBounds(12, 12, 386, 120);
				panel.add(panel_1);
				panel_1.setLayout(null);
				
				JLabel label = new JLabel("Alunos / Desenvolvedores:");
				label.setForeground(Color.BLUE);
				label.setFont(new Font("Tahoma", Font.BOLD, 12));
				label.setBounds(12, 9, 212, 14);
				panel_1.add(label);
				
				JPanel panel_2 = new JPanel();
				panel_2.setBorder(new LineBorder(new Color(176, 224, 230)));
				panel_2.setBackground(new Color(255, 255, 255));
				panel_2.setBounds(12, 26, 362, 81);
				panel_1.add(panel_2);
				panel_2.setLayout(null);
				
				JTextPane textPane = new JTextPane();
				textPane.setText("Amaral\r\nEdicarla\r\nJo\u00E3o\r\nMayne\r\nPablo");
				textPane.setForeground(Color.BLUE);
				textPane.setFont(new Font("Tahoma", Font.BOLD, 11));
				textPane.setBackground(SystemColor.info);
				textPane.setBounds(1, 1, 360, 79);
				panel_2.add(textPane);
			}
		}
		
		JPanel panel = new JPanel();
		panel.setBackground(new Color(240, 248, 255));
		panel.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
		panel.setBounds(12, 7, 410, 73);
		contentPanel.add(panel);
		panel.setLayout(null);
		
		JPanel panel_1 = new JPanel();
		panel_1.setBorder(new LineBorder(new Color(176, 224, 230)));
		panel_1.setBackground(new Color(255, 255, 255));
		panel_1.setBounds(12, 10, 386, 55);
		panel.add(panel_1);
		panel_1.setLayout(null);
		
		JTextPane textPane = new JTextPane();
		textPane.setText("Projeto de POO\r\nSistema para Video-Locadora\r\nProfessor / Cliente: Tito Kenzo");
		textPane.setFont(new Font("Tahoma", Font.BOLD, 12));
		textPane.setEditable(false);
		textPane.setBounds(5, 2, 365, 51);
		panel_1.add(textPane);
	}
}
